//
//  ContractViewController.swift
//  HuaYun
//
//  Created by enghou on 2018/10/11.
//  Copyright © 2018年 xyxorigation. All rights reserved.
//

import UIKit

class ContractListViewController: PotentialProjectViewController {
    
    
    override func viewDidLoad() {
        self.cansearch = true
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }
    
    override func param(for name: String) -> Dictionary<String, Any> {
        return super.param(for: name)
    }


    override func path(for name: String) -> String {
        return ContractList
    }
    

    override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        
        tableView.deselectRow(at: indexPath, animated: true)
        
        let potential = ContractInfoDetailViewController()
        
        potential.title = "合同档案详情"
        
        let model = self.source[indexPath.section]
        
        let id = model.contents?["id"]?.rawString() ?? ""
        
        potential.id = id
        
        self.push(destination: potential)
        
    }
    
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
